import type { UserDetail } from "@/types/user";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useUserDetailStore = defineStore('zhihuiyuanquuserDetail', () => {
  // 用户信息
  const userDetail = ref<UserDetail>({} as UserDetail)
  // 设置用户信息
  const setUserDetail = (val: UserDetail) => {
    userDetail.value = val
  }
  // 清空用户信息
  const clearUserDetail = () => {
    userDetail.value = {} as UserDetail
  }

  return {
    userDetail,
    setUserDetail,
    clearUserDetail
  }
}, {

})